{% import 'macros.html' as macros %}

<!DOCTYPE html>
<html lang="en">
    <head>
        {% block head %}
            <meta charset="UTF-8">
            <title>
                {% block title %}
                    小白鼠 - 高效课堂工具
                {% endblock %}
            </title>
            <script type="text/javascript" src="{{ url_for('static', filename='js/jquery.min.js') }}"></script>
        {% endblock %}
    </head>
    <body>
        <div>
            {% for message in get_flashed_messages() %}
                <div>
                    {{ message }}
                </div>
            {% endfor %}
        </div>
        <div>
            <ul>
                {% if current_user.is_authenticated %}
                    <li><a href="{{url_for('users.logout')}}">登出 ({{ current_user.fullname}})</a></li>
                {% else %}
                    <li><a href="{{url_for('users.login')}}">登录</a></li>
                    <li><a href="{{url_for('users.register')}}">注册</a></li>
                {% endif %}
            </ul>
        </div>
        <div>
            {% block body %}
            {% endblock %}
        </div>
    </body>
</html>